@extends('admin.layout.index')
@section('title')
	用户列表
@endsection
@section('content')
<div class="mws-panel grid_8"> 
   <div class="mws-panel-header"> 
    <span><i class="icon-table"></i> 用户列表</span> 
   </div> 
   <form action="/admin/user/index" method="get">
	   <div class="mws-panel-body no-padding"> 
	    <div role="grid" class="dataTables_wrapper" id="DataTables_Table_1_wrapper">
		    
	     <div class="dataTables_filter" id="DataTables_Table_0_filter">
		     <label>关键字:
		      	<input type="text" name='search' value="{{$request['search'] or ''}}">
		     </label>
			<input type="submit" value="搜索" class="btn btn-primary">
	     </div>
    </form>
     <table class="mws-datatable-fn mws-table dataTable" id="DataTables_Table_1" aria-describedby="DataTables_Table_1_info"> 
      <thead> 
       <tr role="row">
        <th >ID</th>
        <th >用户名</th>
         <th >性别</th>
         <th >创建时间</th>
        <th >邮箱</th>
        <th >地址</th>
        <th >状态</th>
        <th >操作</th>
       </tr> 
      </thead> 
      <tbody role="alert" aria-live="polite" aria-relevant="all">
      @foreach($data as $k=>$v)
      	 <tr class="odd">
        <td class=" ">{{ $v['id'] }}</td> 
        <td class=" ">{{ $v['username'] }}</td> 
        <td class=" ">{{ $v['sex'] }}</td>
        <td class=" ">{{ $v['createTime'] }}</td> 
        <td class=" ">{{ $v['email'] }}</td> 
        <td class=" ">{{ $v['address'] }}</td> 
        <td class=" ">{{ $v['status'] }}</td> 
         
        <td class=" ">
        <a href="/admin/user/delete/{{$v['id']}}" class="btn btn-success" onclick="return confirm('你确定要删除吗？')"><i class="icon-trash"></i></a>
         <a href="/admin/user/edit/{{$v['id']}}" class="btn btn-info"><i class="icon-pencil"></i></a>
        </td> 
       </tr>
       	@endforeach
       	      </tbody>
     </table>
     
  
     <div class="dataTables_info" id="DataTables_Table_1_info">
      <!-- Showing 1 to 10 of 57 entries -->
     </div>
     <div class="dataTables_paginate paging_full_numbers" id="pages">
       {!! $data->appends($request)->render() !!}
     </div>
    </div> 
   </div> 
  </div>
@endsection
